With Host Interface Networking, VirtualBox creates a new networking
interface in software on the host computer. This new
software interface will then exist in parallel to your regular interfaces
(e.g., on a Linux host vbox0
will exist
alongside eth0
). When a guest is using
such a new software interface, it looks to the host system as though the
guest were physically connected to the interface using a network cable:
the host can send data to the guest through that interface and receive
data from it. This means that you can set up routing or bridging between
the guest and the rest of your network.
You can create several VirtualBox host interfaces on the host system (see the following subsections for instructions on how to do so), but each of them can only be connected to a single virtual network card in a single guest at one time. In other words, for each virtual network card that is supposed to use Host Interface Networking, you will need to set up a new interface on the host.
Setting up Host Interface Networking requires changes to your
host's network configuration, which will cause the host to temporarily
lose its network connection. Do not change network settings on remote
or production systems unless you know what you are doing. In
particular, you probably do not want to configure host interface
networking for a remote machine which you have connected to via
ssh
.
There are few limits on the number of setups which can be created using Host Interface Networking. For the sake of simplicity, we will only describe a simple setup using network bridging for the different host operating systems that VirtualBox supports. For more advanced networking needs, we recommend that you consult general documentation about networking on your host operating system.
Network bridging is one of the simplest ways to use Host Interface Networking. Bridging allows you to connect several network devices together in software, so that data sent to one of the devices will be sent to all of them. For our purposes, this means that virtual machines can send packages through the host's network card, using their own network hardware address, and receive packages sent to it. Other computers on your network will see your guests as though they were physically connected to the network. You will need wired (Ethernet) network hardware on the host for this as most current wireless network devices do not support bridging.
In some network environments (often company networks), measures are taken to prevent several MAC addresses being used on a single network interface by temporarily blocking communication to that interface. This is intended to prevent certain types of network attacks, but will also prevent bridging setups from working correctly.